<?php
	session_name("interoprouter");
	session_start();
	
	
	if ($_SESSION["logged"] == "yes")
	{
		// first, decide the text, based on language
		switch ($_SESSION["lang"])
		{
			case "en": $msgLogged = "logged as "; break;
			default: $msgLogged = "logado como "; break;
		}
		// after, render the html
?>

<form action="logout.php" method="post">
            <table cellpadding="4" cellspacing="0">
            	<tr>
					<td></td>
                	<td><?=$msgLogged;?><b><?=$_SESSION["accountUser"];?></b></td>
                	<td><input type="submit" class="loginSubmit" value="logout" /></td>
                </tr>
            </table>
</form>

<?php
	}
	else
	{
		// first, decide the text, based on language
		switch ($_SESSION["lang"])
		{
			case "en": $msgLogin = "user"; $msgPassword = "password"; break;
			default: $msgLogin = "usuário"; $msgPassword = "senha"; break;
		}
		// after, render the html

?>

<form action="login.php?page=<?php echo $name; ?>" method="post">
            <table cellpadding="4" cellspacing="0">
            	<tr>
                	<td><?=$msgLogin;?></td>
                	<td><input type="text" id="loginName" name="loginName" class="loginField" /></td>
                	<td><?=$msgPassword;?></td>
                	<td><input type="password" id="loginPassword" name="loginPassword" class="loginField" /></td>
                	<td><input type="submit" class="loginSubmit" value="ok" /></td>
                </tr>
            </table>
</form>

<?php
	}
?>